import request from '/@/utils/request';

export const getPage = (query: any) =>
	request({
		url: '/mall/userinfo/page',
		method: 'get',
		params: query,
	});

export const getById = (id: string) =>
	request({
		url: '/mall/userinfo/' + id,
		method: 'get',
	});

export const addObj = (data: any) =>
	request({
		url: '/mall/userinfo',
		method: 'post',
		data,
	});

export const editObj = (data: any) =>
	request({
		url: '/mall/userinfo',
		method: 'put',
		data,
	});

export const bindObj = (data: any) =>
	request({
		url: '/mall/userinfo/bind',
		method: 'post',
		data,
	});

export const unbindObj = (id: string) =>
	request({
		url: '/mall/userinfo/unbind/' + id,
		method: 'delete',
	});

export const getCount = (query: any) =>
	request({
		url: '/mall/userinfo/count',
		method: 'get',
		params: query,
	});

export const delObj = (id: string) =>
	request({
		url: '/mall/userinfo/' + id,
		method: 'delete',
	});

export const getStatistics = () =>
	request({
		url: '/mall/userinfo/statistics',
		method: 'get',
	});
export const getTeamPage = (query: any) =>
	request({
		url: '/mall/userinfo/team-page',
		method: 'get',
		params: query,
	});